# -*- mode: snippet -*-
# name: inherit ACE_Svc_Handler {}
# key: ACE_Svc
# --
class ${1:Sample} :
  public ACE_Svc_Handler<ACE_SOCK_STREAM, ${2:ACE_NULL_SYNCH$$(yas/choose-value '("ACE_NULL_SYNCH" "ACE_MT_SYNCH"))}>
{
  typedef ACE_Svc_Handler<ACE_SOCK_STREAM, $2> super;

public:
  int open (void * = 0);

  // Called when input is available from the client.
  virtual int handle_input (ACE_HANDLE fd = ACE_INVALID_HANDLE);

  // Called when output is possible.
  virtual int handle_output (ACE_HANDLE fd = ACE_INVALID_HANDLE);

  // Called when this handler is removed from the ACE_Reactor.
  virtual int handle_close (ACE_HANDLE handle,
                            ACE_Reactor_Mask close_mask);
};

typedef ACE_Acceptor<$1, ACE_SOCK_ACCEPTOR> $1Acceptor;
